<template>
    <div class="signup-wrapper">
        <van-steps :active="activeStep" @click-step="handleClick" active-icon="success" active-color="#07c160">
            <van-step v-for="(item, index) in steps" :key="index">
                    <h5>{{ item.title }}</h5>
            </van-step>
        </van-steps>
       
        <div class="stepContent" v-show="activeStep == 0">
            <div class="title">报名须知</div>
            <div class="content">
                <p>1.报名费用：100元</p>
                <p>2.报名时间：2021年10月1日-2021年10月31日</p>
                <p>3.报名方式：线上报名</p>
            </div>
        </div>
        <div class="stepContent" v-show="activeStep == 1">
            <div class="title">资料填写</div>
            <div class="content">
           content
            </div>
        </div>
        <div class="stepContent" v-show="activeStep == 2">
            <div class="title">信息确认</div>
            <div class="content">
                <p>1.报名费用：100元</p>
                <p>2.报名时间：2021年10月1日-2021年10月31日</p>
                <p>3.报名方式：线上报名</p>
            </div>
        </div>
        <div class="stepContent" v-show="activeStep == 3">
            <div class="title">报名提交</div>
            <div class="content">
                报名提交
            </div>
        </div>
        <div class="btnNext">
            <van-button plain size="small" type="primary" v-show="activeStep!=0" @click="handlePre">上一步</van-button>
            <van-button plain size="small" type="success" v-show="activeStep!=3" @click="handleNext">下一步</van-button>
        </div>
    </div>
</template>
<script setup>
import { ref } from 'vue'
const activeStep = ref(0);
const steps = [
    { title: '报名须知' },
    { title: '资料填写' },
    { title: '信息确认' },
    { title: '报名提交' },
];
const handleClick = (e) => {
    console.log(e)
    activeStep.value = e;
}
const handleNext = () => {
    activeStep.value = activeStep.value + 1;
    console.log(activeStep.value)
}
const handlePre = () => {
    
    activeStep.value = activeStep.value - 1;
    console.log(activeStep.value)
}
</script>
<style lang="scss" scoped>
.signup-wrapper {
    box-sizing: border-box;
    width: 100%;
    height: 100vh;
    background: linear-gradient(to bottom, #ffffe0 10%, #ffffe0 20%, #FFFFFF 70%, #FFFFFF 100%);
    font-size: 24px;

    h5 {
        font-size: 20px;
        margin-top: 10px;
    }

    .steps {
        margin-bottom: 20px;
        background: none;
        font-size: 32px;
    }
}

:deep(.van-steps) {
    width: 100% !important;
    background: transparent;
}

:deep(.van-step__circle-container) {
    width: 120px;
    background-color: transparent;
}

.iconfont {
    font-size: 20px;
    width: 36px;
    height: 36px;
    color: #fff;
    border-radius: 36px;
    text-align: center;
    line-height: 36px;
    background-color: #969896;
}

.iconfont-active {
    font-size: 24px;
    width: 36px;
    height: 36px;
    color: #fff;
    border-radius: 36px;
    text-align: center;
    line-height: 36px;
    background-color: #07c160;
}

.stepContent {
    background-color: #fff;
    color: #666;
    padding: 30px;
    margin: 30px;
    border-radius: 10px;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);

    .title {
        font-size: 20px;
        font-weight: 600;
        text-align: center;
    }

    .content {
        font-size: 24px;
        line-height: 30px;

        p {
            margin-bottom: 20px;
        }
    }
}
.btnNext{
    padding: 30px;
    text-align: center;
}
</style>